<?php
/**
 * 入口文件
 *　1.定义常量
 *  2.加载函数库
 *  3.启动框架
*/
define('STUPBOY',realpath('./'));
define('CORE',STUPBOY . '/core');
define('APP',STUPBOY . '/app');
define('MODULE','app');
include "vendor/autoload.php";
include "vendor/smarty/smarty/libs/Smarty.class.php";
define('DEBUG',true);
define('__PUBLIC__','D:/');

if(DEBUG){
	$whoops = new \Whoops\Run;
	$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
	$whoops->register();
	ini_set('display_error','on');
}else{
	ini_set('display_error','off');
}
// 公用函数库加载
include CORE.'/common/function.php';
// 核销类加载
include CORE.'/stupboy.php';
spl_autoload_register('\core\stupboy::load');// 加载类文件
\Core\stupboy::run();